package com.bigData.main.controller;

import com.bigData.main.TestSocket.ServerResponse;
import com.bigData.main.TestSocket.TestServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/server")
public class ServerController {

    // 可选：保留服务状态查询接口
    @GetMapping("/status")
    public ServerResponse getServerStatus() {
        return new ServerResponse(
                TestServer.isRunning(),
                TestServer.isRunning() ?
                        "Server is running on port 8099" :
                        "Server is not running"
        );
    }

    // 已移除所有启动/停止相关方法
}